package sipus.database.model;

// Generated Oct 23, 2009 4:59:38 PM by Hibernate Tools 3.2.4.CR1

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.envers.Audited;

/**
 * Tbmuser generated by hbm2java
 */
@Entity
@Audited
@Table(schema = "public", name = "tbmuser")
public class Tbmuser implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3868852571082209835L;
	private String userId;
	private String oleh;

	public String toString() {
		return userNama;
	}

	public void setOleh(String oleh) {
		this.oleh = oleh;
	}

	public String getOleh() {
		return oleh;
	}

	private Date tanggal_dirubah = new Date();

	public void setTanggal_dirubah(Date tanggal_dirubah) {
		this.tanggal_dirubah = tanggal_dirubah;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getTanggal_dirubah() {
		return tanggal_dirubah;
	}

	private String userNama;
	private String userPassword;
	private Tbmrole userRole;
	private Integer userShow;
	private String email;

	private Boolean is_encripted;

	private Boolean root;


	public Tbmuser() {
	}

	@Id
	@Column(name = "userid", unique = true, nullable = false, length = 255)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "usernama", nullable = true, length = 255)
	public String getUserNama() {
		return this.userNama;
	}

	public void setUserNama(String userNama) {
		this.userNama = userNama;
	}

	@Column(name = "userpassword", nullable = true, length = 255)
	public String getUserPassword() {
		return this.userPassword;
	}

	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}

	@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "userrole", nullable = true)
	public Tbmrole getUserRole() {
		return this.userRole;
	}

	public void setUserRole(Tbmrole userRole) {
		this.userRole = userRole;
	}

	@Column(name = "usershow", nullable = true)
	public Integer getUserShow() {
		return this.userShow;
	}

	public void setUserShow(Integer userShow) {
		this.userShow = userShow;
	}

	public void setIs_encripted(Boolean is_encripted) {
		this.is_encripted = is_encripted;
	}

	public Boolean getIs_encripted() {
		return is_encripted;
	}

	public void setRoot(Boolean root) {
		this.root = root;
	}

	public Boolean getRoot() {
		return root;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "email")
	public String getEmail() {
		return email;
	}


}
